﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mtdsharp
{
    class Trip
    {
        private string id;
        public string ID
        {
            get { return id; }
        }

        private string headsign;
        public string Headsign
        {
            get { return headsign; }
        }

        private int direction;
        public int Direction
        {
            get { return direction; }
        }

        private string route_id;
        public string RouteID
        {
            get { return route_id; }
        }

        private List<StopTime> stop_times;
        public List<StopTime> StopTimes
        {
            get { return stop_times; }
        }

        public Trip(string gtfsLine)
        {
            // Split up the comma-separated values from the GTFS data line
            string[] gtfsElements = gtfsLine.Split(',');

            // Set the ID, Number and Name properties
            this.id = gtfsElements[2];
            this.headsign = gtfsElements[3];
            this.direction = Convert.ToInt32(gtfsElements[4]);
            this.route_id = gtfsElements[0];
        }
    }
}
